package com.example.demo.module.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.common.service.BaseService;
import com.example.demo.entity.pojo.user.UserPoJo;

import java.util.List;

/**
 * .
 *
 * @author Li Zhiyuan
 * @since 2020/8/21
 */
public interface UserService extends BaseService<UserPoJo> {
    /**
     * create user
     *
     * @param name     name
     * @param password password
     * @return id
     */
    long create(String name, String password);

    /**
     * query user
     *
     * @param user user
     * @return user
     */
    UserPoJo selectOne(UserPoJo user);

    /**
     * query all user
     *
     * @return list
     */
    List selectAll();

    /**
     * user list
     *
     * @param keywords keywords
     * @param page     page
     * @param size     size
     * @return page
     */
    Page<UserPoJo> page(String keywords, final int page, final int size);
}
